package com.tsd.core.utils;

import java.io.File;
import java.io.IOException;


/**
 * 主要用于ios图片的大小缩放
 *
 * @author wudw
 */
public class PicConvertUtil {

    static private String[] batConvertPic(String[] srcList, String root, String srcDir, int width, int height) throws IOException {
        String destPath = root + "\\" + (width + "X" + height);
        if (!FileUtil.isFileExist(destPath)) {
            new File(root + "\\" + (width + "X" + height)).mkdirs();
        }
        String[] destList = new String[srcList.length];
        for (int i = 0; i < srcList.length; i++) {
            String src = root + "\\" + srcDir + "/" + srcList[i];
            String dest = destPath + "\\" + srcList[i];
            destList[i] = dest;
            ImageUtil.zoomImage(new File(src), dest, width, height);
        }
        return destList;
    }

    static public void main(String[] args) {
    }
}
